package cn.edu.scau.cmi.linyiqu.adapter;

import java.util.Comparator;
import java.util.List;

import cn.edu.scau.cmi.linyiqu.adapter.SortUtil;
import cn.edu.scau.cmi.linyiqu.adapter.Student;

public class AdapterOfObject implements Adaptee{
	private SortUtil sortUtil = new SortUtil();

	@Override
	public void sortInt(List<Integer> integerList)
	{
		sortUtil.sortInt(integerList);
	}

	@Override
	public void sortStudent(List<Student> studentList)
	{
		studentList.sort(new Comparator<Student>() {
			@Override
			public int compare(Student o1, Student o2)
			{
				return o1.getId().compareTo(o2.getId());
			}
		});
	}
}
